<?php

namespace Fang\UserBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
*角色赋予权限
*@ORM\Entity
*@ORM\Table(name="rolespermission")
**/
class RolesPermission
{
  /**
  *@ORM\Column(type="integer")
  *@ORM\Id
  *@ORM\GeneratedValue(strategy="AUTO")
  **/
  private $id;
  /**
  *关联角色表
  *@ORM\ManyToOne(targetEntity="Roles")
  *@ORM\JoinColumn(name="rid", referencedColumnName="rid")
  *@ORM\Column(type="integer")
  **/
  private $rid;
  /**
  *关联权限
  *@ORM\ManyToOne(targetEntity="Permission")
  *@ORM\JoinColumn(name="pid", referencedColumnName="pid")
  *@ORM\Column(type="integer")
  **/
  private $pid;

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set rid
     *
     * @param integer $rid
     * @return RolesPermission
     */
    public function setRid($rid)
    {
        $this->rid = $rid;

        return $this;
    }

    /**
     * Get rid
     *
     * @return integer 
     */
    public function getRid()
    {
        return $this->rid;
    }

    /**
     * Set pid
     *
     * @param integer $pid
     * @return RolesPermission
     */
    public function setPid($pid)
    {
        $this->pid = $pid;

        return $this;
    }

    /**
     * Get pid
     *
     * @return integer 
     */
    public function getPid()
    {
        return $this->pid;
    }
}
